package com.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.util.DB;

public class Registermodel {
	private String firstname;
	private String lastname;
	private String homeaddress;
	private String city;
	private String state;
	private String pincode;
	private String countryname;
	private String phoneno;
	private String email;
	private String ebayuserid;
	private String password;
	private String secretques;
	private String answer;
	private Date dob;
	private int active;
	
	public int getActive() {
		return active;
	}
	public void setActive(int active) {
		this.active = active;
	}
	public String getFirstname() {
		return firstname;
	}
	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}
	public String getLastname() {
		return lastname;
	}
	public void setLastname(String lastname) {
		this.lastname = lastname;
	}
	public String getHomeaddress() {
		return homeaddress;
	}
	public void setHomeaddress(String homeaddress) {
		this.homeaddress = homeaddress;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getPincode() {
		return pincode;
	}
	public void setPincode(String pincode) {
		this.pincode = pincode;
	}
	
	public String getPhoneno() {
		return phoneno;
	}
	public void setPhoneno(String phoneno) {
		this.phoneno = phoneno;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getEbayuserid() {
		return ebayuserid;
	}
	public void setEbayuserid(String ebayuserid) {
		this.ebayuserid = ebayuserid;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	
	public String getCountryname() {
		return countryname;
	}
	public void setCountryname(String countryname) {
		this.countryname = countryname;
	}
	public String getSecretques() {
		return secretques;
	}
	public void setSecretques(String secretques) {
		this.secretques = secretques;
	}
	public String getAnswer() {
		return answer;
	}
	public void setAnswer(String answer) {
		this.answer = answer;
	}
	public Date getDob() {
		return dob;
	}
	public void setDob(Date dob) {
		this.dob = dob;
	}
	
	public int insert()
	{
		
		String insertQuery = "insert into register "
			+ "(firstname, lastname, homeaddress,city,state,pincode,country,phoneno,email,ebayuserid,password,secretques,answer,dob,active) " + "values('" + firstname
			+ "', '" + lastname + "', '" +  homeaddress + "','" +  city+ "','" + state + "', '" + pincode + "', '" +countryname+ "','" + phoneno+ "','" + email+ "','" + ebayuserid+ "','" + password+ "','" + secretques+ "','" + answer+ "','" +dob+ "',"+active+");";
		return DB.update(insertQuery);
	}
	
}
